﻿Imports Negocio
Imports Excepciones
Public Class PanelExt
    Inherits Panel
    Implements IControlTranslatable

    Public Sub Translate(ctrls As List(Of Control)) Implements IControlTranslatable.Translate
        For Each ctrl As Windows.Forms.Control In Me.Controls
            Try
                If TypeOf ctrl Is IControlTranslatable Then
                    Dim c As IControlTranslatable = DirectCast(ctrl, IControlTranslatable)
                    c.Translate(ctrls)
                End If
            Catch ex As ControlNotFoundLocalizationException
                Continue For
            Catch ex As ControlNotSupportedLocalizationException
                Continue For
            Catch ex As ControlFoundLocalizationException
                Continue For
            End Try
        Next
    End Sub
End Class
